<template>
  <div class="block-no-results" :style="height">
    <div class="no-results-wrapper">
      <img src="../../assets/images/no_results.svg">
      <div class="text">{{ text }}</div>
      <six-button v-if="showBtn" class="go-shopping-btn" type="danger" size="small" :to="{ path: '/' }">去逛逛</six-button>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    text: {
      type: String,
      default: '赞无更多数据~'
    },
    showBtn: {
      type: Boolean,
      default: false
    },
    height: {
      type: Object,
      default () {
        return { 
          height: 'calc(100% - 50px)'
        }
      }
    }
  }
}  
</script>
<style scoped>
.block-no-results {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.text {
  font-size: 16px;
  color: #999;
}
.go-shopping-btn {
  max-width: 80px;
  height: 30px !important;
  line-height: 30px !important;
  margin-top: 5px;
}
</style>
